
package cz.muni.fi.pb138.jprvyd;

import java.util.List;

/**
 *
 * @author tom
 */
public interface ContactManager {
    
    /**
     * Creates a new contact
     * 
     * @param contact
     * @throws IllegalEntityException 
     */
    public void createContact(Contact contact) throws IllegalEntityException;
    
    /**
     * Removes an existing contact
     * 
     * @param id 
     */
    public void removeContact(Long id);
    
    /**
     * Updates an existing contact
     * 
     * @param contact
     * @throws IllegalEntityException 
     */
    public void updateContact(Contact contact) throws IllegalEntityException;
    
    /**
     * Retrieves contact by id
     * 
     * @param id
     * @return 
     */
    public Contact getContactById(Long id);
    
    /**
     * Retrieves contact by ico
     * 
     * @param ico
     * @return 
     */
    public Contact getContactByIco(int ico);
    
    /**
     * Retrieves contact by dic
     * 
     * @param dic
     * @return 
     */
    public Contact getContactByDic(String dic);
    
    /**
     * Retrieves contact by bank account
     * 
     * @param bankAccount
     * @return 
     */
    public Contact getContactByBankAccount(String bankAccount);
    
    /**
     * Retrieves all contacts
     * 
     * @return 
     */
    public List<Contact> getAllContacts();
    
    /**
     * Retrieves contacts by address
     * 
     * @param address
     * @return 
     */
    public List<Contact> getContactsByAddress(Address address);

}